A moving image encoding device is used to efficiently transmit or record a moving image. As to moving image encoding techniques, H.264/MPEG-4 AVC and one adopted in KTA software may be exemplified as specific examples.
In such moving image encoding techniques, pictures constituting the moving image are managed in the form of a hierarchic structure constituted by slices (obtained by diving a picture), macro blocks (obtained by dividing a slice), and blocks (obtained by dividing the macro blocks). In general, a moving image is encoded on block basis.
Non-Patent Literature 1 discloses an ALF (Adaptive Loop Filter) for filtering a decoded image. ALF performs filtering in which slices in a decoded image are unit areas. For respective unit areas, filter coefficients to minimize an error between an original image and an ALF-treated decoded image are determined. The filtering of ALF is performed on unit area basis with the filter coefficients.